﻿using System.ComponentModel;
using Utils.Wpf;

namespace Plugins.Base.Common
{
	public class StrategyControlVMBase : ViewModelValidatedBase
	{
		#region Properties

		public StrategyControlDataBase Data { get; private set; }

		#endregion

		#region Public Methods

		protected StrategyControlVMBase(StrategyControlDataBase data)
		{
			this.Data = data;
			this.Data.PropertyChanged += Data_PropertyChanged;
		}

		protected override string ValidateField(string fieldName)
		{
			return null; // By default do not use validation
		}

		#endregion

		#region Event Handlers

		private void Data_PropertyChanged(object sender, PropertyChangedEventArgs e)
		{
			base.OnPropertyChanged(e.PropertyName);
		}

		#endregion
	}
}
